﻿
import java.io.BufferedReader;
import java.io.InputStreamReader;
 
public class TOP {
 
    public static void main(String[] args) {
        Runtime rt = Runtime.getRuntime();
        Process p = null;
        try {
            
            
            p = rt.exec("vmstat");
            BufferedReader in = new BufferedReader(new InputStreamReader(p
                    .getInputStream()));
 
            String cl = null;
            while ((cl = in.readLine()) != null) {
                System.out.print(cl);
                System.out.print("\n");
            }
 
            System.out.print("\n");
            in.close();
            
//            p.equals("hello");
            
        } catch (Exception e) {
//            e.printStackTrace();
            System.out.println("jun : " + e );
        }
    }
}